<template>
  <div style="margin: 15px" class="pay">
    <el-card class="Dbox">
      <div slot="header" style="margin: 0px">
        <span
          style="
            margin: 0px;
            display: flex;
            align-items: center;
            font-size: 18px;
          "
        >
          <img
            src="@/assets/img/jlpz.png"
            style="width: 20px; margin-right: 5px"
          />
          奖励模板</span
        >
      </div>
      <div class="xhxBox" style="margin-top: -5px"></div>
      <!-- 查询表单 -->
      <div style="margin: 20px 0px 0px -10px; padding-bottom: 15px">
        <el-form :inline="true" label-position="right" label-width="90px">
          <el-form-item label="奖励时间">
            <el-date-picker
              v-model="formData.field101"
              type="datetimerange"
              align="right"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              style="width: 200px; margin-right: 30px"
              :default-time="['00:00:00', '23:59:59']"
              value-format="yyyy-MM-dd HH:mm:ss"
         
            >
            </el-date-picker>
            <!-- <el-date-picker
              v-model="formData.field103"
              style="width: 200px; margin-right: 30px"
              value-format="yyyy-MM-dd"
              type="daterange"
              range-separator="至"
              clearable
              :picker-options="pickerOptions0"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
            >
            </el-date-picker> -->
          </el-form-item>
          <el-form-item label="奖励模式">
            <el-select
              v-model="formData.field102"
              filterable
              clearable
              placeholder="请选择奖励模"
              style="margin-right: 30px; width: 200px"
            >
              <el-option
                v-for="(item, index) in field111Options"
                :key="index"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>

          <el-form-item label="模版名称">
            <el-input
              v-model="formData.field103"
              placeholder="请输入模版名称"
              :maxlength="30"
              clearable
              style="margin-right: 30px; width: 200px"
            ></el-input>
          </el-form-item>

          <el-form-item label="" style="margin-left: 110px">
            <el-button
              icon="el-icon-refresh"
              style="background: #eeeeee; color: #6396f4; font-weight: bold"
              @click="resetForm"
              >重置
            </el-button>
            <el-button type="primary" icon="el-icon-search" @click="getList"
              >搜索</el-button
            >
          </el-form-item>
        </el-form>
        <!-- <div style="display: flex; justify-content: center">
          <el-button
            icon="el-icon-refresh"
            style="background: #eeeeee; color: #6396f4; font-weight: bold"
            @click="resetForm"
            >重置
          </el-button>
          <el-button type="primary" icon="el-icon-search" @click="submitForm"
            >搜索</el-button
          >
        </div> -->
      </div>

      <el-divider></el-divider>
      <!-- tab-表格 -->
      <div style="margin: 20px 0px">
        <div class="exportButton">
          <el-button
            icon="el-icon-plus"
            type="primary"
            @click="addAwardButton()"
            >新增
          </el-button>
        </div>
        <el-table :data="roleList" :header-cell-style="{
              background: '#FAFAFA',
              color: 'black',
              'font-size': 15 + 'px',
              'text-align': 'center',
            }">
          <el-table-column
            label="奖励时间"
            prop="rewardStartTime"
            align="center"
            width="300"
          >
            <template slot-scope="scope">
              <span
                >{{ scope.row.rewardStartTime }}-{{
                  scope.row.rewardEndTime
                }}</span
              >
            </template>
          </el-table-column>
          <el-table-column label="奖励模版名称" prop="name" align="center" />
          <el-table-column label="奖励依据" prop="keyName" align="center">
            <template slot-scope="scope">
              <span>{{ scope.row.keyName || "暂无" }}</span>
            </template>
          </el-table-column>
          <el-table-column
            label="奖励模式"
            prop="withdrawalAccountType"
            align="center"
            :show-overflow-tooltip="true"
          >
            <template slot-scope="scope">
              <span v-show="scope.row.pattern == 'PERSONAL'">个人</span>
              <span v-show="scope.row.pattern == 'TEAM'">团队</span>
            </template>
          </el-table-column>

          <el-table-column
            label="次数"
            prop="number"
            align="center"
            :show-overflow-tooltip="true"
          >
            <template slot-scope="scope">
              <span>{{ scope.row.number }}</span>
            </template>
          </el-table-column>
          <!-- <el-table-column
            label="规则说明"
            prop="amount"
            align="center"
            :show-overflow-tooltip="true"
          /> -->
          <el-table-column fixed="right" label="操作" align="center">
            <template slot-scope="scope">
              <el-button
                @click="renewButton(scope.row)"
                type="text"
                size="small"
                >更新
              </el-button>
              <el-button
                @click="addAwardButton(scope.row)"
                type="text"
                size="small"
                >编辑
              </el-button>
              <el-button
                @click="getAwardInformationButton(scope.row)"
                type="text"
                size="small"
                >查看奖励信息
              </el-button>
              <el-button
                @click="InformationRuleButton(scope.row)"
                type="text"
                size="small"
                >奖励规则
              </el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <pagination
        style="margin: 0px 0px 50px 0px"
        :total="total"
        :page.sync="queryParams.pageNum"
        :limit.sync="queryParams.pageSize"
        @pagination="getList"
      />
    </el-card>

    <!-- 新增用户 弹窗-->
    <el-dialog :title="awardTitle" :visible.sync="showTan" width="30%" center>
      <el-form
        ref="TanForm"
        :model="formData2"
        :rules="rules2"
        size="medium"
        label-width="110px"
        label-position="left"
      >
        <el-form-item label="奖励模板名称" prop="field101">
          <el-input
            v-model="formData2.field101"
            placeholder="请输入单行文本奖励模板名称"
            :maxlength="20"
            show-word-limit
            clearable
            :style="{ width: '100%' }"
          ></el-input>
        </el-form-item>
        <el-form-item label="奖励日期" prop="field102">
          <el-date-picker
            v-model="formData2.field102"
            type="datetimerange"
            align="right"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            :style="{ width: '100%' }"
            :default-time="['00:00:00', '23:59:59']"
            value-format="yyyy-MM-dd HH:mm:ss"
          >
          </el-date-picker>
        </el-form-item>
        <el-row>
          <el-col :span="12">
            <el-form-item label="项目" prop="field109">
              <el-select
                v-model="formData2.field109"
                placeholder="请选择项目"
                clearable
                disabled
                :style="{ width: '100%' }"
                @input="field109Input"
              >
                <el-option
                  v-for="(item, index) in field109Options"
                  :key="index"
                  :label="item.proName"
                  :value="item.proId"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="奖励模式" prop="field110">
              <el-select
                v-model="formData2.field110"
                placeholder="请选择数据"
                clearable
                :disabled="DisableShow"
                :style="{ width: '100%' }"
                @input="field110Input"
              >
                <el-option
                  v-for="(item, index) in field110Options"
                  :key="index"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="条件依据" prop="field104">
              <el-select
                v-model="formData2.field104"
                placeholder="请选择条件依据"
                clearable
                :disabled="DisableShow"
                :style="{ width: '100%' }"
                @input="field104Input"
              >
                <el-option
                  v-for="(item, index) in field107Options"
                  :key="index"
                  :label="item.columnName"
                  :value="item.columnKey"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="等于" prop="field105">
              <el-input
                v-model="formData2.field105"
                :disabled="DisableShow"
                placeholder="请输入等于"
                clearable
                :style="{ width: '100%' }"
              >
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item label="固定奖励金额" prop="field106">
          <el-input
            v-model="formData2.field106"
            placeholder="请输入固定奖励金额"
            :disabled="DisableShow"
            clearable
            :style="{ width: '100%' }"
          >
          </el-input>
        </el-form-item>

        <el-form-item label="奖励次数" prop="field108">
          <el-input
            v-model="formData2.field108"
            :disabled="DisableShow"
            placeholder="请输入奖励次数"
            clearable
            :style="{ width: '100%' }"
          >
          </el-input>
        </el-form-item>
      </el-form>
      <div slot="footer">
        <el-button @click="showTan = false">取消</el-button>
        <el-button type="primary" @click="addUserFuns('TanForm')"
          >确定</el-button
        >
      </div>
    </el-dialog>

    <!-- 奖励规则 弹窗-->
    <el-dialog title="奖励规则" :visible.sync="InformationRule" center>
      <quill-editor
        ref="text"
        v-model="content"
        class="myQuillEditor"
        :options="editorOption"
        @change="onEditorChange($event)"
      >
      </quill-editor>

      <div slot="footer" class="dialog-footer">
        <span style="text-align: left; margin-right: 5px"
          >{{ TiLength }}/1700</span
        >
        <el-button @click="InformationRule = false">取消</el-button>
        <el-button type="primary" @click="submitButton">确定</el-button>
      </div>
      <!-- <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="InformationRule = false"
          >取消</el-button
        >
        <el-button size="small" type="primary" @click="submitButton"
          >确定</el-button
        >
      </div> -->
    </el-dialog>
  </div>
</template>

<script>
import { quillEditor } from "vue-quill-editor";
import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css";
import {
  getBasis,
  insertRewardTemplate,
  selectRewardTemplates,
  editRewardTemplate,
  RewardRules,
  listAPI,
  selectRewardByProIdAngTypeId,
  updateRewardData,
} from "@/api/projectManagement/index.js";
import { exportXls } from "@/api/finance/index.js";
export default {
  data() {
    return {
      field107Options: [],
      TiLength: "",
      //编辑禁用
      DisableShow: false,
      //新增编辑弹窗标题
      awardTitle: "新增",
      //
      configID: {
        configTypeId: "6",
        configTypeId: "13",
        configTypeId: "5",
        configTypeId: "12",
      },
      formData2: {
        field101: undefined,
        field102: null,
        field104: undefined,
        field105: undefined,
        field106: undefined,
        field110: undefined,
        field108: undefined,
        field109: undefined,
        field110: undefined,
        field107: undefined,
        keyName: undefined,
      },
      rules2: {
        field101: [
          {
            required: true,
            message: "请输入单行文本奖励模板名称",
            trigger: "change",
          },
        ],
        field102: [
          {
            required: true,
            message: "奖励日期不能为空",
            trigger: "change",
          },
        ],
        field104: [
          {
            required: true,
            message: "请选择条件依据",
            trigger: "change",
          },
        ],
        field105: [
          {
            required: true,
            message: "请输入等于",
            trigger: "change",
          },
          {
            pattern: /^\d+$/,
            message: "格式错误",
            trigger: "change",
          },
        ],
        field106: [
          {
            required: true,
            message: "请输入固定奖励金额",
            trigger: "change",
          },
          {
            pattern: /^\d+$/,
            message: "格式错误",
            trigger: "change",
          },
        ],
        field110: [
          {
            required: true,
            message: "请选择奖励模式",
            trigger: "change",
          },
        ],
        field108: [
          {
            required: true,
            message: "请输入奖励次数",
            trigger: "change",
          },
          {
            pattern: /^\d+$/,
            message: "格式错误",
            trigger: "change",
          },
        ],
        field109: [
          {
            required: true,
            message: "请选择项目",
            trigger: "change",
          },
        ],
      },
      //
      field110Options: [
        //  {
        //   label: "团队",
        //   value: "TEAM",
        // },
        // {
        //   label: "个人",
        //   value: "PERSONAL",
        // }
      ],
      field111Options: [
          {
          label: "全部",
          value: undefined,
        },
        {
          label: "团队",
          value: "TEAM",
        },
        {
          label: "个人",
          value: "PERSONAL",
        },
      ],
      field109Options: [],
      //富文本框
      content: "",
      editorOption: {
        modules: {
          syntax: {
            highlight: (text) => hljs.highlightAuto(text).value,
          },
          toolbar: [
            ["bold", "italic", "underline", "strike"], // toggled buttons
            ["blockquote", "code-block"],

            [{ header: 1 }, { header: 2 }], // custom button values
            [{ list: "ordered" }, { list: "bullet" }],
            [{ script: "sub" }, { script: "super" }], // superscript/subscript
            [{ indent: "-1" }, { indent: "+1" }], // outdent/indent
            [{ direction: "rtl" }], // text direction

            [{ size: ["small", false, "large", "huge"] }], // custom dropdown
            [{ header: [1, 2, 3, 4, 5, 6, false] }],

            [{ color: [] }, { background: [] }], // dropdown with defaults from theme
            [{ font: [] }],
            [{ align: [] }],
            // ['link', 'image', 'video', 'formula']//去除video即可
            [], //去除video即可
          ],
        },
        placeholder: "编辑内容...",
      },
      //奖励规则
      InformationRule: false,

      //时间选择器的快捷选择
      pickerOptions: {
        shortcuts: [
          {
            text: "最近一周",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "最近一个月",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "最近三个月",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
              picker.$emit("pick", [start, end]);
            },
          },
        ],
      },
      //弹窗
      showTan: false,

      field103Options: [
        {
          label: "项目数据列选择",
          value: 1,
        },
        {
          label: "百分比列",
          value: 2,
        },
      ],
      field104Options: [
        {
          label: "团队",
          value: "TEAM",
        },
        {
          label: "个人",
          value: "PERSONAL",
        },
      ],
      formData: {
        field101: [],
        field102: undefined,
        field103: undefined,
      },
      pickerOptions0: {
        disabledDate(time) {
          return time.getTime() > Date.now() - 8.64e6;
        },
      },
      // ..卡片总数据
      CardData: {},

      // 用户ID
      userId: null,

      // 时间
      dateRange: [],

      // 遮罩层
      loading: true,
      // 显示搜索条件
      showSearch: true,
      // 分页总条数
      total: 0,
      // 收入表格数据
      noticeList: [],

      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        // 收入类型
        amountType: "",
        // 时间
        // dateRange: "",
      },
      roleList: [{ name: "2" }],
      //判断是否为用户和租户
      userName: "",
      //存储选择的项目
      projectParam: null,
    };
  },
  mounted() {
    this.formData.field101[0] =
      this.moment().format("YYYY") +
      "-" +
      this.moment().format("MM") +
      "-" +
      "01" +
      " " +
      "00:00:00";
    this.formData.field101[1] =
      this.moment().format("YYYY-MM-DD") + " " + "23:59:59";

    this.userName = sessionStorage.getItem("userName");

    const userID = sessionStorage.getItem("userID");
    this.userId = userID - 0;
    if (this.userId) {
      this.getList();
    }
  },
  methods: {
    async getList(row) {
      let param = {
        endTime: this.formData.field101[1], //奖励时间
        name: this.formData.field103, //模板名称
        pageNum: this.queryParams.pageNum,
        pageSize: this.queryParams.pageSize,
        pattern: this.formData.field102, //奖励模式
        startTime: this.formData.field101[0], //奖励时间
        projectId: this.$route.query.proId - 0, //项目ID
      };
      const data = await selectRewardTemplates(param);
      if (data.code == 200) {
        this.roleList = data.data.list;
        this.total = data.data.total;
      } else {
        this.$message.error(data.msg);
      }
      // //console.log(data, "获取列表");
      // 获取项目列表
      const projectData = await listAPI({ pageSize: 1000, pageNum: 1 });
      //console.log(projectData, "项目列表");
      if (projectData.code == 200) {
        if (projectData.data.list.length > 0) {
          this.field109Options = projectData.data.list;
            // //console.log(this.field109Options,'++++++')
            // //console.log(this.$route.query.proId-0,'++++++')

            this.projectParam = this.field109Options.filter(
          (item) => item.proId == this.$route.query.proId-0
        );
          this.formData2.field109=this.$route.query.proId-0;
          // //console.log(this.formData2.field109,'++++++')
        } else {
          this.projectData.data.list = [];
        }
      } else {
        this.$message.error(projectData.msg);
      };
        if(row){
         this.$message({
          message: '搜索中...',
          type: 'success'
        });
      }
    },
    //更新
    async renewButton(row) {
      //console.log(row, "更新");

      let param = {
        configTypeId:this.$route.query.configTypeId-0,  //脱敏和汇总的那个id
        rewardTemplateId:row.id,  
      };
      const data = await updateRewardData(param);
      //console.log(data,'2222');
      if(data.code==200){
         this.$message({
          message: '更新成功!',
          type: 'success'
        });
        this.getList();
      }else{
         this.$message.error(data.msg);
      }
    },
    //条件依据获取条件名称
    async field104Input() {
      let name = this.field107Options.filter(
        (item) => item.columnKey == this.formData2.field104
      );
      this.formData2.keyName = name[0].columnName;
      //console.log(this.formData2.keyName, "66");
    },
    //奖励模式
    async field110Input() {
      this.field107Options = [];
      this.formData2.field104 = "";
      if (this.formData2.field110 == "") {
        this.field107Options = [];
      } else {
        //选中奖励模式以后，判断是个人还是团队，然后通过判断1脱敏2汇总来存configtypId
        // 然后再通过存的id来获取条件依据
        if (this.formData2.field110 == "TEAM") {
          if (this.projectParam[0].typeId == 1) {
            this.formData2.field107 = "5";
          } else {
            this.formData2.field107 = "12";
          }
        } else {
          if (this.projectParam[0].typeId == 1) {
            this.formData2.field107 = "6";
          } else {
            this.formData2.field107 = "13";
          }
        }
        let param = {
          configTypeId: this.formData2.field107 - 0,
          projectId: this.formData2.field109,
        };
        const data = await selectRewardByProIdAngTypeId(param);
        //console.log(data, "依据");
        if (data.code == 200) {
          this.field107Options = [...data.data];
          //console.log(this.field107Options, "8899");
        } else {
          this.$message.error(data.msg);
        }

        // this.field107Options
      }
    },
    //项目下拉
    field109Input() {
      this.field110Options = [];
      this.field107Options = [];
      this.formData2.field110 = "";
      this.formData2.field104 = "";
      if (this.formData2.field109 == "") {
        this.field110Options = [];
      } else {
        this.projectParam = this.field109Options.filter(
          (item) => item.proId == this.formData2.field109
        );
        this.field110Options = [
          {
            label: "团队",
            value: "TEAM",
          },
          {
            label: "个人",
            value: "PERSONAL",
          },
        ];
      }
    },
    //新增弹窗确定按钮
    addUserFuns(row) {
      this.$refs[row].validate(async (valid) => {
        if (valid) {
          let param = {};
          if (this.formData2.id) {
            param = {
              name: this.formData2.field101, //奖励模板名称
              rewardEndTime: this.formData2.field102[1], //奖励日期
              rewardStartTime: this.formData2.field102[0], //奖励日期
              id: this.formData2.id,
            };
            const editData = await editRewardTemplate(param);
            //console.log(editData, "666");
            if (editData.code == 200) {
              this.$message({
                message: `编辑成功!`,
                type: "success",
              });
              this.getList();
              this.showTan = false;
              this.formData2 = {
                field101: undefined,
                field102: [],
                field104: undefined,
                field105: undefined,
                field106: undefined,
                field110: undefined,
                field108: undefined,
                field109: undefined,
                keyName: undefined,
              };
            } else {
              this.$message.error(editData.msg);
            }
          } else {
            param = {
              fixdAmount: this.formData2.field106, //固定奖励金额
              key: this.formData2.field104, //条件依据
              name: this.formData2.field101, //奖励模板名称
              number: this.formData2.field108, //奖励次数
              keyName: this.formData2.keyName, //条件依据名称
              pattern: this.formData2.field110, //奖励模式
              rewardEndTime: this.formData2.field102[1], //奖励日期
              rewardStartTime: this.formData2.field102[0], //奖励日期
              targetValue: this.formData2.field105, //等于
              projectId: this.formData2.field109 + "", //项目ID
              tenantId: this.userId - 0, //租户ID
            };
            const data = await insertRewardTemplate(param);
            //console.log(data, "666");
            if (data.code == 200) {
              this.$message({
                message: `操作成功!`,
                type: "success",
              });
              this.getList();
              this.showTan = false;
              this.formData2 = {
                field101: [],
                field102: undefined,
                field104: undefined,
                field105: undefined,
                field106: undefined,
                field110: undefined,
                field108: undefined,
                field109: undefined,
                keyName: undefined,
              };
            } else {
              this.$message.error(data.msg);
            }
          }
        }
      });
    },
    //新增或编辑按钮
    async addAwardButton(row) {
      this.formData2 = {
        field101: [],
        field102: undefined,
        field104: undefined,
        field105: undefined,
        field106: undefined,
        field110: undefined,
        field108: undefined,
        field109: this.$route.query.proId-0,
        keyName: undefined,
      };

      if (row) {
        // this.field109Input();  //项目下拉
        //  this.field110Input();  //奖励模式下拉
        this.awardTitle = "编辑";
        this.DisableShow = true;
        //console.log(row, "778899");
        //console.log(this.field107Options, "778899");

        this.formData2 = {
          field101: row.name, //奖励模板名称
          field102: [row.rewardStartTime, row.rewardEndTime],
          field104: row.keyName, //条件依据

          field105: row.targetValue, //等于
          field106: row.fixdAmount, //固定奖励金额
          field110: row.pattern, //奖励模式
          field108: row.number, //奖励次数
          // field109: row.keyName, //条件依据名称
          field109: row.projectId, //项目
          id: row.id,
        };
      } else {
        this.field109Input();
        this.DisableShow = false;
        this.awardTitle = "新增";
      }

      this.showTan = true;
    },
    //奖励规则确定按钮
    async submitButton() {
      let param = {
        id: this.formData2.id,
        ruleExplain: this.content,
      };
      const editData = await editRewardTemplate(param);
      // //console.log(editData, "666");
      if (editData.code == 200) {
        this.$message({
          message: `操作成功!`,
          type: "success",
        });
        this.getList();
        this.InformationRule = false;
      } else {
        this.$message.error(editData.msg);
      }
    },
    //奖励规则弹窗
    async InformationRuleButton(row) {
      //console.log(row, "奖励规则");
      this.formData2.id = row.id;
      this.InformationRule = true;
      const RewardRulesData = await RewardRules(row.id);
      //console.log(RewardRulesData, "666677");
      if (RewardRulesData.code == 200) {
        if (RewardRulesData.data.ruleExplain) {
          this.content = RewardRulesData.data.ruleExplain;
          // this.TiLength = RewardRulesData.data.ruleExplain.length;
          this.TiLength = RewardRulesData.getLength() - 1;
        } else {
          this.content = "";
        }
      } else {
        this.$message.error(RewardRulesData.msg);
      }
    },
    //查看奖励信息按钮
    getAwardInformationButton(row) {
      // //console.log(row,'66')
      this.$router.push({
        path: "RewardInformation",
        query: {
          id: row.id,
          projectId: row.projectId,
        },
      });
    },

    //奖励规则
    //富文本字数限制
    onEditorChange(e) {
      e.quill.deleteText(1700, 4);
      if (this.content == "") {
        this.TiLength = 0;
      } else {
        this.TiLength = e.quill.getLength() - 1;
      }
    },

    //搜索
    submitForm() {
      this.getList();
      //console.log(this.formData, "搜索按钮");
      // this.$refs["elForm"].validate((valid) => {
      //   if (valid) {

      //   };
      //   // TODO 提交表单
      // });
    },
    //重置按钮
    resetForm() {
      this.formData = {
        field101: [],
        field102: undefined,
        field103: undefined,
      };
      this.formData.field101 = [];

      this.formData.field101[0] =
        this.moment().format("YYYY") +
        "-" +
        this.moment().format("MM") +
        "-" +
        "01" +
        " " +
        "00:00:00";
      this.formData.field101[1] =
        this.moment().format("YYYY-MM-DD") + " " + "23:59:59";
      this.getList(1);
    },
  },
  components: {
    quillEditor,
  },
};
</script>

<style scoped lang="scss">
//弹窗在屏幕中间
::v-deep .el-dialog__wrapper {
   display: flex;
   justify-content: center;
   align-items: center;
}
::v-deep .el-dialog:not(.is-fullscreen) {
  margin-top: 0vh !important;
}
.myQuillEditor {
  // border:1px red solid;
  height: 400px;
}
.dialog-footer {
  //  border:1px red solid;
  margin-top: 40px;
}
.Dbox {
  height: auto;
}
::v-deep .el-card__header {
  border: none;
}
.xhxBox {
  border-top: 1px #eee solid;
  height: 5px;
  margin-top: 0px;
}
.exportButton {
  /* border: 1px red solid; */
  display: flex;
  margin-bottom: 10px;
  justify-content: flex-start;
}
.el-form-item__label {
  font-weight: 500;
}
</style>
